import { request } from "@/utils/request";

/**
 * 登录
 * @returns
 */
export const login = (data) => {
  return request({
    url: "/login/doLogin",
    method: "POST",
    data,
  });
};

/**
 * 注册
 * @returns
 */
export const register = (data) => {
  return request({
    url: "/login/register",
    method: "POST",
    data,
  });
};

/**
 * 获取token
 * @returns
 */
export const getToken = () => {
  return request({
    url: "/login/token",
    method: "GET",
  });
};

/**
 * 是否登录
 * @returns
 */
export const isLogin = () => {
  return request({
    url: "/login/isLogin",
    method: "GET",
  });
};


export const getSendUserList = () => {
  return request({
    url: "/user/getSendUserList",
    method: "GET",
  });
};

export const getReceiveUserList = () => {
  return request({
    url: "/user/getReceiveUserList",
    method: "GET",
  });
};

export const changeUserStatus = (params) => {
  return request({
    url: "/user/changeStatus",
    method: "GET",
    params
  });
};

export const getUserPage = (params) => {
  return request({
    url: "/user/page",
    method: "GET",
    params
  });
};

export const getUserInfo = (params) => {
  return request({
    url: "/login/userInfo",
    method: "GET",
    params
  });
};
